package com.fpt.group3.dao;

import static org.junit.Assert.*;

import java.util.List;

import com.fpt.group3.form.Government;
import com.fpt.group3.service.exception.SystemException;

import org.junit.Before;
import org.junit.Test;
/**
 * JUnitTest
 * @author Spatra
 *
 */
public class GovernmentDAOImplTest {
    /**
     * govdao.
     */
    GovernmentDAOImpl govdao;
    /**
     * generate test.
     * @throws Exception exception
     */
    @Before
    public void setUp() throws Exception {
        this.govdao = new GovernmentDAOImpl();
    }
    /**
     * test function1 listGovernment.
     */
    @Test
    public final void testListGovernment() {
            List<Government> listGovernment = null;
            try {
                listGovernment = govdao.listGovernment(true);
            } catch (SystemException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            assertTrue(listGovernment.size() > 0);
    }
    /**
     * test function2 listCounty.
     */
    @Test
    public final void testListCounty() {
        List<String> listCounty = null;
        listCounty = govdao.getListCounty("VinaCop");
        assertTrue(listCounty.size() > 0);
    }
}
